﻿<%@ Page Title="申请售后" Language="C#" MasterPageFile="~/Wap/Shop/ShopSite.Master" AutoEventWireup="true"
    CodeBehind="ReturnablesList.aspx.cs" Inherits="ZLCMS.Web.Wap.Shop.ReturnablesList" %>
    <%@ Register src="Footer.ascx" tagname="Footer" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
	#nav li{ border-left:1px solid #ddd;box-sizing: border-box;  -webkit-box-sizing: border-box; -moz-box-sizing: border-box; border-bottom:1px solid #ddd;}
	#nav li:nth-child(1){ border-left:none;}
	#navFixed .ui-navbar ul li a.ui-btn-active{ color:#f9384d; border-bottom-color:#f9384d;}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="pages" runat="server">
    <div data-role="page" id="mypage">
        <div data-role="header">
        </div>
        <!-- /header -->
        <div role="main" class="ui-content">

    	<!--s nav-->
        <div id="navFixed" >
        <div id="nav">
        	<div data-role="navbar" nav="navFixed">
              <ul>
                <li><a href="ReturnablesList.aspx?no=<%=Request["no"] %>" data-theme="f" data-ajax="false" class='ui-btn-active'">申请售后</a></li>
                <li><a href="ReturnsList.aspx" data-theme="f" data-ajax="false">售后记录</a></li>
              </ul>
            </div>
        </div>
        </div>
        <!--e nav-->
        
       <div class="listviewHandler">

       </div>
       <div style="display:none">
        <button id="btnMore" data-icon="refresh" style="width: 95%; margin-left: auto; margin-right: auto;">显示更多</button>
       </div>

        </div>
        <!-- /content -->

	<div data-role="footer" data-position="fixed" data-tap-toggle="false">
    
                <uc1:Footer ID="Footer1" runat="server" MenuId="M" />    
    </div>
        <!-- /footer -->
    </div>
    <script src="/wap/lib/common/listviewHandler.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            queryData();
        });

        function queryData() {
            var param = $.extend({}, { MemberAccount: '<%=CurrentMemberAccount %>',OrderNo:'<%=Request["no"] %>' });
            var handler = $('.listviewHandler').listviewHandler();
            handler.initialize({
                loaderBtn: $('#btnMore'), //加载数据按钮（点击加载下一页）
                emptyHtml: '<p class="more">-- 没有订单信息 --</p>', //无记录时显示此html
                itemTemplate: '<div class="apply_refund">'
                + '<div class="title"><div class="left">订单号：<span>{OrderNo}</span></div>'
                + '<div class="right">{OrderTime}</div>'
                + '</div>'
                + ' <div class="box">'
            	+ '<div class="left" style="background:url({ThumbnailImg}) no-repeat center; background-size:cover;"></div>'
                + '<div class="right">'
                + '<div class="text">{ProductName}</div>'
                + '<p>{SkuHtml}</p>'
                + '<p>￥{SalePrice}<a href="SubmitReturnApply.aspx?no={OrderNo}&pno={ProductNo}&sku={ProductSkuNo}" data-ajax="false">申请售后</a></p>'
                + '</div>'
                + '</div>'
                + '</div>', //项模板
                pageIndex: 1, //页码（从1起算）
                pageSize: 20, //页大小
                totalCount: 999, //总记录数
                itemHandler: function (data, itemTemplate, container) {//数据各项处理
                    data.ThumbnailImg = firstThumbnail(data.ThumbnailImg);
                    var skuData = $.parseJSON(data.SkuParamCode);
                    var skuHtml = '';
                    $(skuData).each(function () { skuHtml += '<span>' + this.ItemName + '</span>'; });
                    data.SkuHtml = skuHtml;
                    return itemTemplate.format(data);
                },
                command: 'Member.LoadReturnablesList',
                parameter: param
            });
            handler.nextPage();
        }

        $(function () {
            $(window).scroll(function () {
                //当内容滚动到底部时加载新的内容

                if ($(this).scrollTop() + $(window).height() + 20 >= $(document).height() && $(this).scrollTop() > 20) {
                    //当前要加载的页码
                    $('#btnMore').click();
                }
            });
        });
    </script>
</asp:Content>
